package com.kai.service.article.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 博客文章表
 * </p>
 *
 * @author wjk
 * @since 2022-03-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Article extends Model<Article> {

    private static final long serialVersionUID = 1L;

    /**
     * 文章id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 作者id
     */
    private Long authorId;

    /**
     * 用户专栏id
     */
    private Integer columnId;

    /**
     * 标题
     */
    private String title;

    /**
     * 简介
     */
    private String summary;

    /**
     * 简介图片url
     */
    private String summaryImgUrl;

    /**
     * 类别标签
     */
    private String categoryLabel;

    /**
     * 文章状态 DRAFT-草稿，PUBLISHED-已发布
     */
    private String status;

    /**
     * 是否删除 1-已删除，0-未删除
     */
    private Integer isDeleted;

    /**
     * 创建时间
     */
    private Date createDatetime;

    /**
     * 更新时间
     */
    private Date updateDatetime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
